package br.com.knowledge.persistence.hibernate.entities;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import org.hibernate.annotations.GenericGenerator;

/**
 * BcdStoredprocedure entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "bcd_storedprocedure", schema = "public")
public class BcdStoredprocedure implements java.io.Serializable {

	// Fields

	private Integer id;
	private String nomestoredprocedure;
	private Set<AbdStroredprocedureinferencia> abdStroredprocedureinferencias = new HashSet<AbdStroredprocedureinferencia>(
			0);
	private Set<AbdStroredprocedureinferencia> abdStroredprocedureinferencias_1 = new HashSet<AbdStroredprocedureinferencia>(
			0);

	// Constructors

	/** default constructor */
	public BcdStoredprocedure() {
	}

	/** minimal constructor */
	public BcdStoredprocedure(String nomestoredprocedure) {
		this.nomestoredprocedure = nomestoredprocedure;
	}

	/** full constructor */
	public BcdStoredprocedure(String nomestoredprocedure,
			Set<AbdStroredprocedureinferencia> abdStroredprocedureinferencias,
			Set<AbdStroredprocedureinferencia> abdStroredprocedureinferencias_1) {
		this.nomestoredprocedure = nomestoredprocedure;
		this.abdStroredprocedureinferencias = abdStroredprocedureinferencias;
		this.abdStroredprocedureinferencias_1 = abdStroredprocedureinferencias_1;
	}

	// Property accessors
	@GenericGenerator(name = "generator", strategy = "increment")
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "nomestoredprocedure", nullable = false, length = 256)
	public String getNomestoredprocedure() {
		return this.nomestoredprocedure;
	}

	public void setNomestoredprocedure(String nomestoredprocedure) {
		this.nomestoredprocedure = nomestoredprocedure;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "bcdStoredprocedure")
	public Set<AbdStroredprocedureinferencia> getAbdStroredprocedureinferencias() {
		return this.abdStroredprocedureinferencias;
	}

	public void setAbdStroredprocedureinferencias(
			Set<AbdStroredprocedureinferencia> abdStroredprocedureinferencias) {
		this.abdStroredprocedureinferencias = abdStroredprocedureinferencias;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "bcdStoredprocedure")
	public Set<AbdStroredprocedureinferencia> getAbdStroredprocedureinferencias_1() {
		return this.abdStroredprocedureinferencias_1;
	}

	public void setAbdStroredprocedureinferencias_1(
			Set<AbdStroredprocedureinferencia> abdStroredprocedureinferencias_1) {
		this.abdStroredprocedureinferencias_1 = abdStroredprocedureinferencias_1;
	}

}